### Create service principal

1. In your Databrick console, go to the admin settings by clicking your username in the to right corner -> Admin settings (add photo)

<img
  src="https://res.cloudinary.com/diuctyblm/image/upload/f_auto,q_auto/v1/dwh/databricks/admin_settings"
  alt="Admin settings"
/>

2. Go to the Service principals tab, then click Add service principal (add photo)

<img
  src="https://res.cloudinary.com/diuctyblm/image/upload/f_auto,q_auto/v1/dwh/databricks/service_principals_settings"
  alt="Service principal settings"
/>

3. Give the service principal a good name (e.g elementary) and click Add (add photo)

<img
  src="https://res.cloudinary.com/diuctyblm/image/upload/f_auto,q_auto/v1/dwh/databricks/add_service_principal"
  alt="Add service principal"
/>

4. Then, from the service principal configuration view, copy the Application Id (add photo)

<img
  src="https://res.cloudinary.com/diuctyblm/image/upload/f_auto,q_auto/v1/dwh/databricks/service_principal_id"
  alt="Service principal ID"
/>

4. Finally, run the following query:

```
GRANT SELECT ON SCHEMA <elementary_schema> TO `<service_principal_id>`;
```

Make sure to replace the `<elementary_schema>` and `<service_principal_id>` placeholders with the correct values
